##maven3.9 + openjdk-17
FROM crpi-4bfcfxsrrhebv9pu.cn-chengdu.personal.cr.aliyuncs.com/wyj_docker/maven:v1.0 as builder

WORKDIR /source

COPY memberList_back/pom.xml .

RUN mvn dependency:go-offline

COPY memberList_back .

ARG MAVEN_OPTS="-DskipTests"

RUN mvn clean package $MAVEN_OPTS

FROM crpi-4bfcfxsrrhebv9pu.cn-chengdu.personal.cr.aliyuncs.com/wyj_docker/jdk17:v1.0

COPY --from=builder /source/target/*.jar  /app/server.jar

EXPOSE 8080

WORKDIR /app

ENTRYPOINT ["java","-jar","/app/server.jar"]